// 封装部门列表接口
import request from '@/utils/request'

export function getDepartments() {
  return request({
    url: '/company/department'
  })
}

// 封装新增部门列表
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 封装删除部门接口
export function delDepartments(id) {
  return request({
    method: 'delete',
    url: '/company/department/' + id
  })
}

// 封装企业查询的接口
export function departmentDetail(id) {
  return request({
    url: '/company/department/' + id
  })
}

// 封装编辑接口
export function updataDepartments(data) {
  return request({
    method: 'put',
    url: '/company/department/' + data.id,
    data
  })
}
